package com.lyf.boot.modules.monitor.controller;

import com.lyf.boot.core.model.R;
import com.lyf.boot.core.server.Server;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 * @author Luyufan
 * @date 2024/1/11 16:17
 **/
@RestController
@RequestMapping("/server")
public class ServerController {

    /**
     * 服务器信息接口
     * @return
     * @throws Exception
     */
    @PostMapping("/info")
    public R<Server> getServerInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return R.ok(server);
    }
}
